<template>
  <div>
    <van-nav-bar title="个人车辆信息" left-text="返回" right-text="修改" left-arrow @click-left="back" @click-right="change"/>
    <div class="mine" v-for="item in list" :key="item.id">
      <h3>个人车辆信息</h3>
      <p>车牌号：{{item.plateNo}}</p>
      <p>车型：{{item.type}}</p>
    </div>
  </div>

    
</template>

<script>
import mixin from  "@/mixin/flag";
import {carinformation} from "./Service"
export default {
    mixins:[mixin],
    data() {
      return {
        list:[],
      };
  },
    methods:{
    back(){
      this.$router.go(-1);
    },
    change(){
      this.$router.push('/park/change');
    },

  },
  async created(){
    let res= await carinformation();
    // console.log(this.list.length);
    this.list=res.data.rows;    
    if(!this.list.length){
      this.$router.push('/park/change');
    }
  }
}
</script>

<style lang="scss" scoped>
.mine{
  padding-left: 25px;
  font-size: 16px;
}

</style>